﻿@model IEnumerable<ElCharro01.Models.ClothingType>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<div class="prefix_1 grid_8 suffix_1 alpha" align="center">
    <h2 align="center">
        Gestione Tipo Abbigliamento</h2>
    <p>
        @Html.ActionLink("Crea Nuovo Tipo Abbigliamento", "Create")
    </p>
    <table>
        <tr>
            <th>
                Nome
            </th>
            <th>
                Prodotti Associati
            </th>
            <th colspan="2">
                Gestione Tipo Abbigliamento
            </th>
        </tr>
        @foreach (var clothingType in Model)
        {
            <tr>
                <td>
                    @clothingType.Nome
                </td>
                <td align="center">
                    @clothingType.Product.Count
                </td>
                <td style="width: 50px;">
                    @Html.ActionLink("Edit", "Edit", new { id = clothingType.ID })
                </td>
                <td style="width: 50px;">
                    @Html.ActionLink("Delete", "Delete", new { id = clothingType.ID })
                </td>
            </tr>
        }
    </table>
</div>
